package com.empire.module.member.controller.admin.mapconfig.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Schema(description = "管理后台 - 地图配置主新增/修改 Request VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MapConfigSaveReqVO {

    @Schema(description = "配置ID（UUID）", example = "29396")
    private String id;

    @Schema(description = "配置名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @NotEmpty(message = "配置名称不能为空")
    private String name;

    @Schema(description = "配置描述", example = "随便")
    private String description;

    @Schema(description = "省份编码（参考国家标准GB/T 2260）")
    private String provinceCode;  // 明确的初始化表达式

    @Schema(description = "城市编码")
    private String cityCode;  // 明确的初始化表达式

    @Schema(description = "区县编码")
    private String districtCode;

    @Schema(description = "地图中心经度（范围：-180~180）")
    private BigDecimal centerLng;  // 明确的初始化表达式

    @Schema(description = "地图中心纬度（范围：-90~90）")
    private BigDecimal centerLat;  // 明确的初始化表达式

    @Schema(description = "缩放级别（范围：1~20）")
    private Integer zoomLevel = 13;  // 明确的初始化表达式

    @Schema(description = "是否默认配置：0-否，1-是")
    @NotNull(message = "是否默认配置：0-否，1-是不能为空")
    private Integer isDefault = 0;  // 明确的初始化表达式

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @Schema(description = "最后更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @Schema(description = "两个点多少距离算聚集")
    private Double distance;

    @Schema(description = "两个点的时间间隔")
    private Integer interval;

    @Schema(description = "1-围栏预警;2-聚集预警;3-出入杭预警")
    private Integer warnType;

    @Schema(description = "关键词集合")
    private String keywords;

    @Schema(description = "围栏类型：1-禁入，1-禁出")
    private Integer fenceType;

}
